=== VybeDraft Post Automator ===
Contributors: infinitistudios
Tags: ai, post generator, content automation, blog, gpt
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Instantly generate complete, SEO-optimized blog posts from just a title. Power your site with Gemini, Claude, and GPT-5 in seconds, directly from your WordPress Dashboard.

== Description ==

**VybeDraft Post Automator** is the ultimate AI writing assistant built directly in your WordPress dashboard. Say goodbye to writer's block and hours spent formatting. With VybeDraft, you can transform a single post title into a complete, structured, and SEO-optimized article in just seconds.

Whether you need a quick draft or a polished, publish-ready post, VybeDraft hooks directly into the world’s most advanced AI models—including OpenAI, Google Gemini, and Anthropic Claude—to write engaging, formatted content that reads like it was written by a human.

It’s completely image-aware too. Upload a featured image or gallery, and the AI will reference the visual details directly in your post. Plus, it handles all your SEO homework by automatically generating focus keywords for Yoast, Rank Math, and AIOSEO. 

Stop copying and pasting from external tools. Start automating your content creation effortlessly.

= Key Features =

* **One-Click Post Generation** — Turn a simple title into a complete, formatted article instantly.
* **Direct AI Connections** — Native integrations for OpenAI, Google Gemini, Anthropic Claude, and OpenRouter (no middlemen).
* **Next-Gen Model Support** — Connect to GPT-5.6, Claude 4.6, Gemini 3.5, and more for cutting-edge reasoning.
* **Multimodal (Image-Aware)** — Upload images and the AI dynamically analyzes and references them in the written text.
* **SEO Focus Keywords** — Auto-populates SEO keywords for Yoast SEO, Rank Math, and All in One SEO.
* **Custom Master Prompt** — Fine-tune the AI’s tone, format, constraints, and style to match your brand.
* **Multi-Language Support** — Generate content in any language (French, Spanish, German, etc.) by specifying it in your Master Prompt.
* **VybeDraft Key Sync** — Automatically detects and shares API credentials from your VybeDraft Product Uploader.



= How It Works =

1. Enter a post title (required)
2. Optionally add a featured image, post details, gallery images, target audience, categories, and tags
3. Click "Generate Post"
4. AI creates a full post with content, excerpt, SEO keywords, and suggested tags
5. Review or publish immediately

== External Services ==

This plugin connects to external AI services to generate post content. The specific service used depends on your settings:

= OpenAI =
* Service: [OpenAI API](https://openai.com/)
* Terms: [https://openai.com/policies/terms-of-use](https://openai.com/policies/terms-of-use)
* Privacy: [https://openai.com/policies/privacy-policy](https://openai.com/policies/privacy-policy)

= Google Gemini =
* Service: [Google AI Studio](https://ai.google.dev/)
* Terms: [https://ai.google.dev/gemini-api/terms](https://ai.google.dev/gemini-api/terms)
* Privacy: [https://policies.google.com/privacy](https://policies.google.com/privacy)

= Anthropic Claude =
* Service: [Anthropic API](https://www.anthropic.com/)
* Terms: [https://www.anthropic.com/legal/terms](https://www.anthropic.com/legal/terms)
* Privacy: [https://www.anthropic.com/legal/privacy](https://www.anthropic.com/legal/privacy)

= OpenRouter =
* Service: [OpenRouter](https://openrouter.ai/)
* Terms: [https://openrouter.ai/terms](https://openrouter.ai/terms)
* Privacy: [https://openrouter.ai/privacy](https://openrouter.ai/privacy)

**Data Sent**: Post title, optional post details, target audience text, and optionally base64-encoded images are sent to the selected AI service for content generation. No personal user data is transmitted.

== Installation ==

1. Upload the plugin or install from the WordPress.org repository
2. Activate the VybeDraft Post Automator plugin
3. Go to Posts → Automator Settings and configure your API key and preferred AI model
4. Navigate to Posts → Post Automator to start generating posts

== Frequently Asked Questions ==

= 1. Where do I get the API keys for this plugin? =
Since VybeDraft is a BYOK (Bring Your Own Key) plugin, you will need to generate an API key from the provider(s) you wish to use:
*   **OpenAI:** https://platform.openai.com
*   **Anthropic:** https://console.anthropic.com
*   **Google Gemini (Google AI Studio):** https://aistudio.google.com
*   **OpenRouter:** https://openrouter.ai
Simply copy the key from your provider's developer console and paste it into the Post Automator settings page.

= 2. Are my API keys and blog content secure? =
Yes, absolutely. Because of our BYOK architecture, your API keys are stored securely in your local WordPress database. When you generate a blog post, your data (post title, description, and images) is sent directly from your server to the AI provider. No middleman server sits in between, and no data is shared with us.

= 3. What if a scheduled post fails to publish? =
VybeDraft includes a built-in recovery check that runs in the background. If a scheduled post is missed, the plugin catches it and publishes it automatically.

= 4. Why did my post generation fail? =
The most common reasons for a failed generation are:
*   **API Key issues:** Your key might be incorrect, or your developer account has run out of usage credits or billing has not been enabled on the provider's end.
*   **Image constraints:** Make sure you are uploading standard image formats (JPG, PNG, or WebP). If the image is extremely large (above 4-5MB), try compressing it first.
*   **Server Timeout:** Generating high-quality, long-form content can take time. If your web host limits PHP execution times, the process might time out. We configure generous timeouts to mitigate this, but using faster models like Claude Haiku or Gemini Flash helps.

= 5. Is there a limit to how many blog posts I can generate? =
No. The plugin itself imposes no limits on single post generation. Your only limitations are the rate limits and funding limits on your chosen AI provider developer account. Note that the free version limits scheduled posts to 3 at a time.

= 6. Can I edit the AI-generated content before publishing? =
Absolutely — and we encourage it. By default, every generated post is saved as a WordPress draft (unless you choose "Publish Immediately" in the options). You have full control to review, edit, and refine any field (headings, content paragraphs, excerpt, category, tags, and focus keywords) before the post goes live on your site.

= 7. Can I generate blog posts in languages other than English? =
Yes. You can instruct the AI to write in any language by updating your Custom Master Prompt in the plugin settings. For example, adding "Write all blog posts in German" to your custom instructions will apply that preference to every generation.

= 8. Will this plugin slow down my website? =
No. VybeDraft only runs inside the WordPress admin dashboard and does not load any scripts or styles on your public-facing storefront. Your visitors will never experience any slowdown.

= 9. Does this plugin work with page builders (Elementor, Divi, Gutenberg)? =
Yes. VybeDraft Post Automator generates standard WordPress post content, meaning it is fully compatible with both the default Block Editor (Gutenberg) and the Classic Editor. Once the draft is saved, you can easily load and design it using Elementor, Divi, or any other page builder.


== Changelog ==

= 1.0.0 =
* Initial release
* Support for OpenAI, Gemini, Claude, and OpenRouter
* Featured image and gallery support
* SEO keyword auto-population (Yoast, Rank Math, AIOSEO)
* Draft/Publish status setting
* VybeDraft Product Uploader API key fallback
* Added model speed badges (fast/medium/slow) with estimated generation times
* Expanded model support: Qwen 3.7, DeepSeek V4, Gemma 4
* Fixed loopback request timeout for more reliable background generation
* Added self-healing re-trigger for stalled async jobs
* Extended poll timeout to 10 minutes for slower reasoning models
* Minor bug fixes and UI improvements
